/**
 * This class handles the switching between the data and video.
 */

package com.in2solar.in2solarmonitor.client;

import com.google.gwt.user.client.Timer;

public class StartTimer {
	
	// We start a timer...
	public static Timer t = new Timer() {
	      public void run() {
	    	  
	    	  // ...and if we are on the data page...
	    	  if (In2SolarMonitor.html.getHTML().contains(In2SolarMonitor.dataURL)){
	  	        
	    		  // ...we load the video.
	    		  In2SolarMonitor.goVideo();

	    	  }
	    	  else{
	    		  
	    		  // Otherwise, we load the data.
	    		  In2SolarMonitor.goData();
	    	  }
	      }
	    };
}